<template>
  <div id="app">
    <router-view v-if="$store.state.isLogin"></router-view>
    <div v-if="nodeEnv == 'development' && !$store.state.isLogin">
    </div>
  </div>
</template>

<script>
  export default {
    name: 'App',
    data () {
      var vm = this;
      vm.$router.beforeResolve((to, from, next) => {
        vm.$history.from = from.path;
        next();
      });
      return {
        nodeEnv: process.env.NODE_ENV
      };
    },
    methods: {
    },
    mounted: function () {
      var vm = this;
      if (!vm.$store.state.isLogin) {
        vm.$store.commit("userStatus", {
          userId: '320281199408289026'
        });
      }
    }
  };
</script>

<style lang="scss">
@import '~@assets/css/style.scss';
</style>
